<?php
//index.php
//Contains the homepage functionality. - rjs

//External access to this page is permitted. - rjs
$allow=true;

require_once("overhead.php");

//Get the assignments for the current course
$getAssignmentsQuery = mysql_query("select a.Name as Name,a.ID as ID from assignment as a join course as c on a.CourseID=c.ID where c.Token = '".$currentCourse."'");
$assignments = null;
while ($row=mysql_fetch_assoc($getAssignmentsQuery)) {
	$tempAssignment['Name'] = $row['Name'];
	$tempAssignment['ID'] = $row['ID'];
	$assignments[]=$tempAssignment;
}

//Pull in the view depending on the current user's role - rjs
if ($currentRole=="instructor") {
	include_once("index_instructor.php");
} else {
	include_once("index_student.php");
}
?>